                <!-- table -->
				<div class="box">
					<!-- box / title -->
					<div class="title">
						<h5>
                            <?=$title;?>
                            <?php if($month_start!='-'): ?>
                            <?='Periode '.month_name($month_start) .' '.$year_start.' s/d '.month_name($month_end).' '.$year_end.' ';?>
                            <?php 
                                if($customer<>'All')
                                    
                             ?>
                            <?php endif;?>
                        </h5>
						<div class="search">
                        <?php if($month_start!='-'): ?>
                            <?=form_open('cashflow/cash/getPaymentExport')?>
								<div class="input">
                                    <label class="search"><?=lang('export')?></label>
									<?=form_dropdown('export',config('export'))?>
								</div>
								<div class="button">
									<?=form_submit('submit',lang('export'))?>
								</div>
							<?=form_close()?>
                        
                        <?php else:?>
                            <?=form_open('cashflow/cash/getPayment')?>
								<div class="input">
                                    <?=form_dropdown('month',config('month'),date('m'))?>
                                    <?=form_dropdown('year',config('year'),date('Y'))?>
								</div>
      
                                <div class="input">
                                    <?=form_dropdown('month2',config('month'),date('m'))?>
                                    <?=form_dropdown('year2',config('year'),date('Y'))?>
								</div>
                                <div class="input">
									<?=form_dropdown('customer',$customers,'','style="width:100px"')?>
								</div>
								<div class="button">
									<input type="submit" name="submit" value="Search" />
								</div>
							<?=form_close()?>
                         <?php endif;?>   
						</div>
					</div>
					<!-- end box / title -->
					<div class="table">
                    
                        <?php if($this->session->flashdata('success')):?>
						<div id="message-success" class="message message-success">
							<div class="image">
								<img src="resources/images/icons/success.png" alt="Success" height="32" />
							</div>
							<div class="text">
								<h6>Send Email</h6>
								<span>Send Email Success to Recipient , to Edit email set to Settings Menu !</span>
							</div>
							<div class="dismiss">
									<a href="#message-success"></a>
							</div>
						</div>
						<?php elseif($this->session->flashdata('error')):?>
						<div id="message-error" class="message message-error">
								<div class="image">
									<img src="resources/images/icons/error.png" alt="Error" height="32" />
								</div>
								<div class="text">
									<h6>Send Email</h6>
									<span>Send Email Error to Recipient , to Edit email set to Settings Menu !</span>
								</div>
								<div class="dismiss">
									<a href="#message-error"></a>
								</div>
						</div>
						<?php endif;?>
                        
                        
                        <?php if($month_start!='-'):?>
                        <div class="action">
                            <?=anchor('cashflow/cash/getPaymentReset','Kembali Ke Awal');?>
			         	</div>
                        <?php endif;?>
                        
						<table>
							<thead>
                                <?php 
                                   //echo $customer;
                                    if($customer=='All'):
                                        $col = 9;
                                    else:
                                        $col = 8;
                                    endif;        
                                ?>
                                <tr>
                					<th colspan="<?=$col?>" class="center"><?=lang('invoice')?></th>
                					<th rowspan="2" class="center"><?=lang('due_date')?></th>
                					<th colspan='6' class="center"><?=lang('received')?></th>
            				    </tr>	
								<tr>
                                    
									<th><?=lang('no')?></th>
                                    <?php if($customer=='All'): ?>
                					<th><?=lang('customer')?></th>
                                    <?php endif;?>						
                                    <th><?=lang('date')?></th>
                                    <th><?=lang('invoice').lang('usd')?></th>
                                    <th><?=lang('mmbtu')?></th>
                                    <th><?=lang('usd')?></th>
                                    <th><?=lang('invoice').lang('idr')?></th>
                                    <th><?='M&sup3;'?></th>
                                    <th><?=lang('idr')?></th>
                                    <th><?=lang('date')?></th>
                                    <th><?=lang('usd')?></th>
                                    <th><?=lang('acc')?></th>
                                    <th><?=lang('date')?></th>
                                    <th><?=lang('idr')?></th>
                                    <th><?=lang('acc')?></th>
								</tr>
                                
							</thead>
							<tbody>
                                <?php $i=1;?>
                                <?php foreach($cash as $row): ?>
                                <?php $row_pdo = $this->invoices->getPdoInvoicePayment($row['NoInvUSD'],$row['NoInvIDR']);?>
                                <tr>
                                    <td style="width:2%;"><?=$i?></td>
                                    <?php if($customer=="All"):?>
                                    <td><p><?=$row['Perusahaan']?></p></td>
                                    <?php endif;?>
                                    <td><?=indonesian_date($row['InvoiceDate'])?></td>
                                    <td><?=$row['NoInvUSD']?></td>
                                    <td><?=decimal($row['JumlahMBTU'],2)?></td>
                                    <td><?=decimal($row['AmountUSD'],2)?></td>
                                    <td><?=$row['NoInvIDR']?></td>
                                    <td><?=decimal($row['JumlahMeter'],2)?></td>
                                    <td><?=decimal($row['AmountIDR'],2)?></td>
                                    <td><?=indonesian_date($row['DueDate'])?></td>
                                    <td>
                                    <?php 
                                         if(!empty($row_pdo['Tanggal']))   
                                            echo indonesian_date($row_pdo['Tanggal'])
                                    ?>
                                    </td>
                                    <td>
                                    <?php
                                         if(!empty($row_pdo['Amount']))  
                                            echo decimal($row_pdo['Amount'],2)
                                    ?>
                                    </td>
                                    <td>
                                    <?php 
                                       if(!empty($row_pdo['MataUang']))   
                                           if($row_pdo['MataUang']=='USD') 
                                                if(!empty($row_pdo['NoRek']))
                                                    echo $row_pdo['NoRek']
                                    ?>
                                    </td>
                                    <td>
                                    <?php 
                                        if(!empty($row_pdo['TglTerimaInvoice'])) 
                                            echo indonesian_date($row_pdo['TglTerimaInvoice'])
                                    ?>
                                    </td>
                                    <td>
                                    <?php
                                        if(!empty($row_pdo['Credit']))  
                                            echo decimal($row_pdo['Credit'],2)
                                    ?>
                                    </td>
                                    <td>
                                    <?php 
                                        if(!empty($row_pdo['MataUang'])) 
                                            if($row_pdo['MataUang']=='IDR') 
                                                if(!empty($row_pdo['NoRek']))
                                                    echo $row_pdo['NoRek']
                                    ?>
                                    </td>
                                </tr>
                                <?php
                                    $i++;
                                    endforeach;?>
							</tbody>
						</table>
                        
                        <?php if($month_start!='-'):?>
                        <div class="action">
                            <?=anchor('cashflow/cash/getPaymentReset','Kembali Ke Awal');?>
			         	</div>
                        <?php endif;?>
                        
					</div>
				</div>
				<!-- end table -->